//
//  NSObject+HDSelectModel.m
//  app
//
//  Created by D on 15/8/21.
//  Copyright (c) 2015年 hdaren. All rights reserved.
//

#import "HDSelectModel.h"
#import "HDBulidingModel.h"
#import "HDHouseModel.h"


@implementation HDSelectModel

-(instancetype)initWithDict:(NSDictionary *)dict WithSign:(NSString *)sign
{
    if (self = [super init]) {
        
        if (sign.integerValue == 0) {
            //小区列表
            self.title = @"亲选择您所在的小区";
            self.community_name = dict[@"name"];
            self.community_id = dict[@"cmid"];
        }
        else if (sign.integerValue == 1)
        {   //组团列表
            self.title = @"亲选择您所在的组团";
            self.group_name = dict[@"name"];
            self.group_id = dict[@"id"];
            
        }
        else if (sign.integerValue == 2)
        {   //楼号列表
            self.title = @"亲选择您所在的楼牌";
            self.building_name = dict[@"name"];
            self.building_id = dict[@"id"];
           
        }
        else if (sign.integerValue == 3)
        {   //房号列表
            self.title = @"亲选择您所在的房间";
            self.house_name = dict[@"house_address"];
            self.house_id = dict[@"id"];
            self.community_id = dict[@"cmid"];
        }
        
    }
    return self;
}


+(instancetype)modelWithDict:(NSDictionary *)dict WithSign:(NSString *)sign
{
    return [[self alloc]initWithDict:dict WithSign:sign];
}
@end
